/*
 * @Date: 2025-06-13 14:34:13
 * @LastEditors: lyx
 * @LastEditTime: 2025-06-13 14:37:50
 * @FilePath: \blog\src\plugins\remark-link-lawlighty.js
 * @Description: 
 */
import { findAndReplace } from "mdast-util-find-and-replace";
import { u } from "unist-builder";

export function remarkLinkLawlighty() {
  return (tree, { data }) => {
    findAndReplace(tree, [
      [
        /Lawlighty/g,
        function ($0) {
          return u("link", { url: "https://github.com/Lawlighty" }, [u("text", "Lawlighty(阿帽🧢)")]);
        },
      ]
    ]);
  };
}
